package com.example.basic.web.model.terminal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 终端操作记录
 * </p>
 *
 * @roleor zzl
 * @since 2024-3-14
 */
@Data
@TableName("sys_terminal_record")
@ApiModel(value="TerminalRecord对象", description="终端操作记录")
public class TerminalRecord extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "操作类型")
    @TableField("oper_type")
    private String operType;

    @ApiModelProperty(value = "终端编码")
    @TableField("terminal_code")
    private String terminalCode;

    @ApiModelProperty(value = "终端名称")
    @TableField(exist = false)
    private String terminalName;

    @ApiModelProperty(value = "终端型号")
    @TableField(exist = false)
    private String terminalModel;

    @ApiModelProperty(value = "遗体编码")
    @TableField("remains_code")
    private String remainsCode;

    @ApiModelProperty(value = "库位编码")
    @TableField("depot_code")
    private String depotCode;

    @ApiModelProperty(value = "指令下达时间")
    @TableField("instruct_time")
    @JsonFormat(pattern = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date instructTime;

    @ApiModelProperty(value = "指令完成时间")
    @TableField("finish_time")
    @JsonFormat(pattern = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date finishTime;

    @ApiModelProperty(value = "指令起点")
    @TableField("instruct_start")
    private String instructStart;

    @ApiModelProperty(value = "指令终点")
    @TableField("instruct_end")
    private String instructEnd;

    @ApiModelProperty(value = "指令状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String statusName;

    @ApiModelProperty(value = "操作人")
    @TableField("oper_person")
    private String operPerson;

    @ApiModelProperty(value = "序号")
    @TableField("sort_no")
    private Integer sortNo;

    @ApiModelProperty(value = "操作单据号")
    @TableField("document_no")
    private String documentNo;

    @ApiModelProperty(value = "单据状态")
    @TableField("document_status")
    private String documentStatus;

    @ApiModelProperty(value = "任务示例id")
    @TableField("task_record_id")
    private String taskRecordId;

    @ApiModelProperty(value = "指令地址")
    @TableField("instruct_address")
    private String instructAddress;
}